<template>
  <div>
    <slot></slot>
    <ul>
      <li v-for="item in list" :key="item.id">
        <input type="checkbox" v-model="item.status" />
        <span>{{ item.title }}</span>

        <a @click="remove(item.id)">x</a>
      </li>
    </ul>
  </div>
</template>
<script>
import { mapMutations } from "vuex";
export default {
  props: ["list"],
  methods: {
    ...mapMutations(["remove"]),
  },
};
</script>
